<?php


class ServiceOutletCategoryModel extends BaseModel
{
    protected $table = 'yf_service_outlet_category';

    protected $principal = 'id';

    const status = [
        'open' => 1,//开启
        'close' => -1,//关闭
    ];

    /**
     * 获取全部正常使用的分类
     * @return array|bool
     */
    public function findAllOpen()
    {
        return $this->findAll(['status' => self::status['open']], ['id', 'name']);
    }

}